package com.app.pojo.demo;

import java.io.Serializable;
import java.util.Date;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;

//参考
//https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods.query-creation
//@Table("test_result")
//jpa 文档 https://www.51cto.com/article/743932.html
@Entity
@IdClass(value = TestResultID.class)
public class TestResult implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id; // 分区表中id 和testDate作为业务主键
	@Id
	private Date testDate;

	private String coreStudentId;

	private Date testTime;

	private String questionId;

	private String questionFlag;

	private Double score;

	private Double lastScore;

	private String answer;

	private Date beginTime;

	private Date lastTime;

	private String flag;

	private String scoreRemark;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getTestDate() {
		return testDate;
	}

	public void setTestDate(Date testDate) {
		this.testDate = testDate;
	}

	public String getCoreStudentId() {
		return coreStudentId;
	}

	public void setCoreStudentId(String coreStudentId) {
		this.coreStudentId = coreStudentId;
	}

	public Date getTestTime() {
		return testTime;
	}

	public void setTestTime(Date testTime) {
		this.testTime = testTime;
	}

	public String getQuestionId() {
		return questionId;
	}

	public void setQuestionId(String questionId) {
		this.questionId = questionId;
	}

	public String getQuestionFlag() {
		return questionFlag;
	}

	public void setQuestionFlag(String questionFlag) {
		this.questionFlag = questionFlag;
	}

	public Double getScore() {
		return score;
	}

	public void setScore(Double score) {
		this.score = score;
	}

	public Double getLastScore() {
		return lastScore;
	}

	public void setLastScore(Double lastScore) {
		this.lastScore = lastScore;
	}

	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}

	public Date getLastTime() {
		return lastTime;
	}

	public void setLastTime(Date lastTime) {
		this.lastTime = lastTime;
	}

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getScoreRemark() {
		return scoreRemark;
	}

	public void setScoreRemark(String scoreRemark) {
		this.scoreRemark = scoreRemark;
	}

	@Override
	public String toString() {
		return String.format(
				"TestResult [id=%s, testDate=%s, coreStudentId=%s, testTime=%s, questionId=%s, questionFlag=%s, score=%s, lastScore=%s, answer=%s, beginTime=%s, lastTime=%s, flag=%s, scoreRemark=%s]",
				id, testDate, coreStudentId, testTime, questionId, questionFlag, score, lastScore, answer, beginTime,
				lastTime, flag, scoreRemark);
	}

	
	
	
}